package org.jeecg.common.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * @author guoyh
 * @ClassName AccountFlowTypeEnum
 * @Description
 * @since 2020/8/27 02:35
 **/
@Getter
@AllArgsConstructor
public enum AccountFlowTypeEnum {

    INCOME(1,"收入"),
    REFUND(2,"退款"),
    WITHDRAW(3,"提现");

    private int code;

    private String desc;
    public static AccountFlowTypeEnum getInstance(Integer code){
        return Arrays.stream(values()).filter(item -> Objects.equals(code,item.getCode())).findFirst().orElse(null);
    }

}
